package at.fhooe.mc.msports.ui;

import net.rim.device.api.ui.DrawStyle;
import net.rim.device.api.ui.Font;
import net.rim.device.api.ui.Graphics;
import net.rim.device.api.ui.component.LabelField;

public class ColorableLabel extends LabelField{

	private int color;
	
	public ColorableLabel(String text, int color){
		this(text,color,(USE_ALL_WIDTH|DrawStyle.HCENTER),Font.getDefault());
	}
	
	public ColorableLabel(String text, int color, long style){
		this(text,color,style,Font.getDefault());
	}
	
	public ColorableLabel(String text, int color, long style, Font font){
		super(text,style);
		
		this.color = color;
		super.setFont(font);
	}
	
	public void setColor(int color){
		this.color = color;
	}
	
	public void setFont(Font font){
		super.setFont(font);
	}
	
	protected void paint(Graphics graphics) {
		graphics.setColor(color);
		super.paint(graphics);
	}
}
